As one example of a state detecting circuit of this type, there is a key press detecting circuit which detects a key press of a keyboard instrument. FIG. 18 is a circuit diagram illustrating a configuration example of a state detecting circuit for one key provided in this type of key press detecting circuit. In this example, three switches A, B, C are provided for one key of the keyboard. Here, the switch A switches from OFF to ON when a key press depth exceeds a threshold th1. Further, the switch B switches from OFF to ON when the key press depth exceeds a threshold th2 (>th1). Further, the switch C switches from OFF to ON when the key press depth exceeds a threshold th3 (>th2). The state detecting circuit illustrated in FIG. 18 is to detect the ON/OFF states of these switches A, B, and C.
As illustrated in FIG. 18, the state detecting circuit for one key is constituted of switches A, B, C, diodes Da, Db, Dc, and a resistance R. Here, respective anodes of the diodes Da, Db, and Dc are connected to selection lines SL1, SL2, and SL3, respectively. Further, respective cathodes of the diodes Da, Db, and Dc are connected to respective one ends of the switches A, B, and C. Further, respective other ends of the switches A, B, and C are connected to one end of the resistance R, and the other end of this resistance R is grounded. A common connection point of the switches A, B, C and the resistance R is connected to an output signal line OL.
In FIG. 18, selection signals S1, S2, and S3 which sequentially become H (high) level are respectively outputted to the selection lines SL1, SL2, and SL3. In a period in which the selection signal S1 is at the H level and the selection signals S2 and S3 are at L (low) level, the diodes Db and Dc are in the OFF states. In this period, if the switch A is in the ON state, the selection signal S1 is applied to the resistance R via the diode Da and the switch A. As a result, a state signal Q at the H level is outputted to the output signal line OL. On the other hand, if the switch A is in the OFF state, since the output signal line OL is grounded via the resistance R, a state signal Q at the L level is outputted to the output signal line OL. Further, in a period in which the selection signal S2 is at the H level and the selection signals S1 and S3 are at the L level, the diodes Da and Dc are in the OFF state. Thus, the state signal Q at the level according to ON/OFF state of the switch B is outputted to the output signal line OL. Further, in a period in which the selection signal S3 is at the H level and the selection signals S1 and S2 are at the L level, the diodes Da and Db are in the OFF state. Thus, the state signal Q at the level according to ON/OFF state of the switch C is outputted to the output signal line OL.
The key press detecting circuit using this state detecting circuit monitors the state signal Q outputted to the output signal line OL while cyclically repeating the operation to sequentially change the selection signals S1, S2, and S3 to the H level, and detects the timing at which each of the switches A, B, and C switches from the OFF state to the ON state. Then a calculation of velocity, and/or the like is performed based on detection results of the timings of ON-OFF switching of the switches. Incidentally, as a technical document related to the key press detecting circuit, there is PTL1.